import request from "@/utils/request";

// 查询易宝代扣列表
export function listYeePayWithholding(query) {
  return request({
    url: "/ecs/yeePayWithholding/list",
    method: "get",
    params: query,
  });
}

export function getYeePayWithholdingOne(query) {
  return request({
    url: "/ecs/yeePayWithholding/getYeePayWithholding",
    method: "get",
    params: query,
  });
}

// 查询易宝代扣详细
export function getYeePayWithholding(id) {
  return request({
    url: "/ecs/yeePayWithholding/" + id,
    method: "get",
  });
}

// 新增易宝代扣
export function addYeePayWithholding(data) {
  return request({
    url: "/ecs/yeePayWithholding",
    method: "post",
    data: data,
  });
}

// 修改易宝代扣
export function updateYeePayWithholding(data) {
  return request({
    url: "/ecs/yeePayWithholding",
    method: "put",
    data: data,
  });
}

export function updateYeePayWithholdingFeeRate(data) {
  return request({
    url: "/ecs/yeePayWithholding/editFeeRate",
    method: "put",
    data,
  });
}

// 删除易宝代扣
export function delYeePayWithholding(id) {
  return request({
    url: "/ecs/yeePayWithholding/" + id,
    method: "delete",
  });
}

export function incoming(data) {
  return request({
    url: "/ecs/yeePayWithholding/incoming",
    method: "post",
    data: data,
  });
}

// 代运营服务商抽佣绑定门店
export function yopMerchantShopBind(data) {
  return request({
    url: "/ecs/yeePayWithholding/yopMerchantShopBind",
    method: "post",
    data: data,
  });
}

export function queryYeePayWithholdingIncoming(query) {
  return request({
    url: "/ecs/yeePayWithholding/queryYeePayWithholdingIncoming",
    method: "get",
    params: query,
  });
}

export function shopCreate(data) {
  return request({
    url: "/ecs/yeePayWithholding/shopCreate",
    method: "post",
    data: data,
  });
}

export function getYopMerchantShopBind(data) {
  return request({
    url: "/ecs/yeePayWithholding/getYopMerchantShopBind",
    method: "get",
    params: data,
  });
}

export function bindCardCreate(data) {
  return request({
    url: "/ecs/yeePayWithholding/bindCardCreate",
    method: "post",
    data: data,
  });
}

export function getBindCard(data) {
  return request({
    url: "/ecs/yeePayWithholding/getBindCard",
    method: "get",
    params: data,
  });
}

export function nBindCard(data) {
  return request({
    url: "/ecs/yeePayWithholding/nBindCard",
    method: "post",
    data: data,
  });
}
